<%--
  Created by IntelliJ IDEA.
  User: User
  Date: 2024/5/17
  Time: 15:51
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
    <head>
        <title>Title</title>
    </head>
    <body>

        <!--
            文件上传对于表单存在两个要求:
            1.表单提交方式必须是post
            2.数据传输方式必须是二进制流的方式,enctype="multipart/form-data"
        -->
        <form action="${pageContext.request.contextPath}/upload.file" method="post" enctype="multipart/form-data">
            用户名: <input type="text" name="username">
            <br>
            文件: <input type="file" name="file">
            <br>
            <input type="submit" value="提交">
        </form>
    </body>
</html>
